home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / latex209 / contrib / revtex / osabib.sty < prev    next >
Text File  |  1992-11-09  |  5KB  |  175 lines

  1. %%% ======================================================================
  2. %%%  @LaTeX-style-file{
  3. %%%     filename        = "osabib.sty",
  4. %%%     version         = "3.0",
  5. %%%     date            = "November 10, 1992",
  6. %%%     ISO-date        = "1992.11.10",
  7. %%%     time            = "15:41:54.18 EST",
  8. %%%     author          = "Optical Society of America",
  9. %%%     contact         = "Frank E. Harris",
  10. %%%     address         = "Optical Society of America
  11. %%%                        2010 Massachusetts Ave., N.W.
  12. %%%                        Washington, D.C.  20036-1023",
  13. %%%     email           = "fharris@pinet.aip.org (Internet)",
  14. %%%     telephone       = "(202) 416-1903",
  15. %%%     FAX             = "(202) 416-6120",
  16. %%%     supported       = "yes",
  17. %%%     archived        = "pinet.aip.org/pub/revtex,
  18. %%%                        Niord.SHSU.edu:[FILESERV.REVTEX]",
  19. %%%     keywords        = "REVTeX, version 3.0, style file, bibliography,
  20. %%%                        Optical Society of America",
  21. %%%     codetable       = "ISO/ASCII",
  22. %%%     checksum        = "44750 174 422 5234",
  23. %%%     docstring       = "This is a society-specific bibliography style file
  24. %%%                        for the OSA under REVTeX 3.0.
  25. %%%
  26. %%%                        The checksum field above contains a CRC-16
  27. %%%                        checksum as the first value, followed by the
  28. %%%                        equivalent of the standard UNIX wc (word
  29. %%%                        count) utility output of lines, words, and
  30. %%%                        characters.  This is produced by Robert
  31. %%%                        Solovay's checksum utility."
  32. %%% }
  33. %%% ======================================================================
  34. % ******* Start of file osabib.sty *******
  35. %
  36. % Copyright (c) 1992, Optical Society of America.
  37. %
  38. %   This is one of the files of the release version of the OSA macros for
  39. % REVTEX 3.0. REVTEX 3.0 is being developed by cooperation between the AAS,
  40. % AGU, AIP, APS, and OSA.
  41. %
  42. %
  43. % Support is available weekdays, 8:45 am--4:30 pm, East coast(USA) time.
  44. %
  45. %     Frank Harris
  46. %     Optical Society of America
  47. %     2010 Massachusetts Ave. N.W.
  48. %     Washington D.C. 20036-1023
  49. %     (202) 416-1903 (phone)
  50. %     (202) 416-6120 (fax)
  51. %     fharris@aip.org (Internet)
  52. %
  53. %
  54. %
  55.  
  56. \typeout{Filename: osabib.sty, v1.0 <November 20, 1992>}
  57.  
  58. \def\@bibitem#1{\item\if@filesw \immediate\write\@auxout
  59.        {\string\bibcite{#1}{\the\value{\@listctr}}}\fi\ignorespaces}
  60.  
  61. \def\@cite#1#2{{#1\if@tempswa , #2\fi}}  %
  62. \def\@biblabel#1{${#1.\,\,\,}$} %
  63.  
  64. \newdimen\WidestRefLabelThusFar
  65. \global\WidestRefLabelThusFar\z@
  66.  
  67. \def\bibcite#1#2{\global\@namedef{b@#1}{#2}\@SetMaxRefLabel{#1}}
  68.  
  69. \def\@SetMaxRefLabel#1{%
  70.   {%
  71.     \setbox0\hbox{${\csname b@#1\endcsname}.\,\,\,$}%
  72.     \ifdim\wd0>\WidestRefLabelThusFar
  73.       \global\WidestRefLabelThusFar=\wd0
  74.     \fi
  75.   }%
  76. }
  77.  
  78. \def\@citex[#1]#2{%
  79. \if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
  80. \leavevmode\unskip$^{\scriptstyle\@cite{\@collapse{#2}}{#1}}$}
  81.  
  82. \def\CITE{%
  83. \@ifnextchar[{\@tempswatrue\@CITEX}{\@tempswafalse\@CITEX[]}%
  84. }
  85.  
  86. \let\onlinecite\CITE
  87.  
  88. \def\@CITEX[#1]#2{%
  89. \if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
  90. \leavevmode\unskip\ \@cite{\@collapse{#2}}{#1}}
  91.  
  92. \let\bylinecite\cite
  93.  
  94. \def\@collapse#1{%
  95.  {%
  96.   \let\@temp\relax
  97.   \@tempcntb\@MM
  98.   \def\@citea{}%
  99.   \@for \@citeb:=#1\do{%
  100.     \@ifundefined{b@\@citeb}%
  101.       {\@temp\@citea{\bf ?}%
  102.        \@tempcntb\@MM\let\@temp\relax
  103.        \@warning{Citation `\@citeb ' on page \thepage\space undefined}%
  104.       }%
  105.       {\@tempcnta\@tempcntb \advance\@tempcnta\@ne
  106.        \edef\MyTemp{\csname b@\@citeb\endcsname}%
  107.        \def\@tempa{\@temptokena=\bgroup}%
  108.        \if0A{\fi%
  109.        \afterassignment\@tempa %
  110.        \@tempcntb=0\MyTemp\relax}%
  111.        \ifnum\@tempcntb=0\relax%
  112.          \@tempcntb=\@MM
  113.          \@citea\MyTemp
  114.          \let\@temp = \relax
  115.        \else %
  116.          \edef\@tempd{\number\@tempcntb}%
  117.          \ifnum\@tempcnta=\@tempcntb %
  118.             \ifx\@temp\relax %
  119.                \edef\@temp{\@citea\@tempd}%
  120.             \else
  121.                \edef\@temp{\hbox{--}\@tempd}%
  122.             \fi
  123.          \else %
  124.            \@temp\@citea\@tempd
  125.            \let\@temp\relax
  126.          \fi
  127.        \fi
  128.       }%
  129.     \def\@citea{, }%
  130.   }%
  131.   \@temp %
  132.  }%
  133. }%
  134.  
  135. \def\references{%
  136.   \ifpreprintsty
  137.     \newpage
  138.     \hbox to\hsize{\refname\hss}%
  139.   \else
  140.     \vskip24pt
  141.     \hrule width\textwidth\relax
  142.     \vskip 1.6cm
  143.   \fi
  144.   \list{\@biblabel{\arabic{enumiv}}}%
  145.        {\labelwidth\WidestRefLabelThusFar  \labelsep2pt %
  146.         \leftmargin\labelwidth
  147.         \advance\leftmargin\labelsep
  148.         \ifdim\baselinestretch pt>1 pt  %
  149.           \parsep  4pt\relax
  150.         \else
  151.           \parsep  0pt\relax
  152.         \fi
  153.         \itemsep\parsep
  154.         \usecounter{enumiv}%
  155.         \let\p@enumiv\@empty
  156.         \def\theenumiv{\arabic{enumiv}}%
  157.        }%
  158.   \let\newblock\relax
  159.   \sloppy\clubpenalty4000\widowpenalty4000
  160.   \sfcode`\.=1000\relax
  161.   \ifpreprintsty\else\small\fi
  162. }
  163.  
  164. \def\endreferences{%
  165.   \def\@noitemerr{\@warning{Empty `thebibliography' environment}}%
  166.   \endlist     \let\@SetMaxRefLabel\@gobble
  167. }
  168.  
  169. \def\thebibliography#1{\references}
  170.  
  171. \def\endthebibliography{\endreferences}
  172.  
  173. %
  174. % ****** End of file osabib.sty ******
  175.